import request from "@/utils/request";
import qs from "qs";

export function getProjectReportList(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManage/interface_projectreport_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getCusDocsList(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManageInter/interface_cusadddocumentlist_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getTotalPackageList(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManageInter/interface_totalpackagecuslist_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getEngineerAgentList(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManageInter/interface_engineeragentcuslist_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getDoorFactoryList(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManageInter/interface_doorfactorycuslist_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function addProjectReport(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      "/admin/projectReport/interface_projectreport_save",
    method: "post",
    headers: {
      "Content-Type": "application/json"
    },
    data: data
  });
}

export function updateProjectReport(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      "/admin/projectReport/interface_projectreport_update",
    method: "post",
    headers: {
      "Content-Type": "application/json"
    },
    data: data
  });
}

export function getLockModel(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManage/interface_lockmodel_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getCompetitivebrand(data) {
  return request({
    url:
      process.env.VUE_APP_URL1 +
      "/projectmanage_service/projectManage/interface_competitivebrand_query.shtml",
    method: "post",
    data: qs.stringify(data)
  });
}

export function getProjectStatusList(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      "/admin/projectReport/interface_projectstatus_query",
    method: "post",
    data: qs.stringify(data)
  });
}

export function uploadFile(data) {
  return request({
    url: process.env.VUE_APP_URL2 + "/file/uploadMobileFile",
    method: "post",
    headers: {
      "content-type": "multipart/form-data"
    },
    data: data.fd,
    params: {
      ...data.params
    }
  });
}

export function projectServeyUpdate(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      `/admin/projectReport/interface_projectinvestigate_update`,
    method: "post",
    headers: {
      "Content-Type": "application/json"
    },
    data
  });
}

export function projectServeyQuery(data) {
  return request({
    url:
      process.env.VUE_APP_URL2 +
      "/admin/projectReport/interface_projectinvestigate_query",
    method: "post",
    data: qs.stringify(data)
  });
}
